package com.clkj.xiuzheng.dao.shangcheng;

import com.clkj.xiuzheng.pojo.shangcheng.Health;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

import java.util.List;

/**
 * @author yawang
 * @create 2024/06/25 15:38:18
 **/
@Repository
public interface HealthMapper extends Mapper<Health>, MySqlMapper<Health> {
    @Select("select a.* ,b.user_answer from t_xz_health a " +
            "left join t_xz_healthUser b " +
            "on a.health_id  = b.health_id where b.user_id = #{userId}")
    List<Health> listUserHealth(@Param("userId")Integer userId);
}
